﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PefStudio.Windows
{
    /// <summary>
    /// Interaction logic for ProgressBar.xaml
    /// </summary>
    [Export(MainWindow.MainStatusBarContract, typeof(IStatusBarItem))]
    public partial class ProgressBar : AbstractStatusBarItem
    {
        public ProgressBar()
        {
            InitializeComponent();

            HorizontalAlignment = HorizontalAlignment.Right;
        }

        public void SetProgress(int value)
        {
            Action setProgressAction = delegate
            {
                progressBar.Value = value;
            };
            setProgressAction();
        }
    }
}
